import { Module } from '@nestjs/common';
import { RoleController } from './role.controller';
import { RoleService } from './role.service';
import { TypeOrmModule } from "@nestjs/typeorm";
import { Role } from '../../entities/role.entity';
import { Permission } from "../../entities/permission.entity";
import { PassportModule } from '@nestjs/passport';
import { JwtModule } from '@nestjs/jwt';
@Module({
    imports: [TypeOrmModule.forFeature([Role]),
    TypeOrmModule.forFeature([Permission]),
    PassportModule.register({ defaultStrategy: 'jwt' }),
    JwtModule.register({
        secret: 'secretKey',
        signOptions: {
            expiresIn: 3600
        }
    })],
    exports: [RoleService],
    controllers: [RoleController],
    providers: [RoleService],
})
export class RoleModule { }